// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import Resource from 'vue-resource'
import Mint from 'mint-ui';


import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import 'mint-ui/lib/index.js'
import 'mint-ui/lib/style.css'
// import 'element-ui/src/index.js'
Vue.use(Element)

Vue.use(Resource);
Vue.use(VueRouter);
Vue.use(Mint);
Vue.config.productionTip = false

import '../src/common/css/icon.css'//字体图标引用
import './common/css/base.scss'//公共样式
// 1. 定义（路由）组件。
import goods from './components/goods/goods.vue'
import ratings from './components/ratings/ratings.vue'
import seller from './components/seller/seller.vue'
import shopcarplay from './components/shopcarplay/shopcarplay.vue'
// import playchild from './components/shopcarplay/children/playchild.vue'
// import child from './components/shopcarplay/children/children/child.vue'

// 2. 定义路由
const routes = [
  {path: '/', redirect: '/goods'},//路由重定向启动页面自动进入定向的页面
  {
    path: '/goods',
    component: goods,
  },
  {path: '/ratings', component: ratings},
  {path: '/seller', component: seller},
  {
    path: '/shopcarplay',
    component: shopcarplay,
    // children:[{
    //   path:'playchild',
    //   component:playchild,
    //   children:[{
    //     path:'child',
    //     component:child
    //   }]
    // }]
  }
]

// 3. 创建 router 实例，然后传 `routes` 配置
const router = new VueRouter({
  routes,
  linkActiveClass: 'active'//配置点击的active样式，默认是router-link-active更改为active
});

// 4. 创建和挂载根实例。
new Vue({
  el: '#app',
  router,// 4. 创建和挂载根实例。
  template: '<App/>',
  components: {App}

})
